<html>
<head>
    <script type="text/javascript" src="/js/jquery-1.2.6.min.js"></script>
    <script type="text/javascript" src="/js/ds.base.js"></script>
    <style type="text/css" media="screen">
        body {background-color: #CFE1EF;margin:10px 0px 0px 10px;}
        form div label { font-size: .7em;}
        .error-message {color: #FF5353;	font-weight: bold;}
        .hint {color: #ccc;font-weight: bold;}
    </style>
</head>
<body>
    ${h.form(h.url(action='loginpost'), id="commentlogonform", method='post')}
        <input type="hidden" id="goto" name="goto" value="${c.return_url}" />
        % if c.user:

            Logged in as:  ${c.user.displayname}
            % if c.user.hashedemail:
            <img alt="" src="http://www.gravatar.com/avatar/${c.user.hashedemail}?s=24" class="avatar avatar-48" height="24" width="24">
            % endif
             <a href="/comment/logout" id="ds-logout-link" >Logout</a>
             % if c.user.authn == 'local':
             , <a href="/account/settings" target="_parent" >Settings</a> 
             % endif
        % else:
            
            <div>
                ${h.text_field('email', value=(c.item and c.item.email) or 'your email', size=40, class_="hint", tabindex=1)}
                <label for="email">email  (required)</label>
            </div>
            <div>
                ${h.password_field('password', size=40, tabindex=2)}
                <label for="password">password  (required)</label>
            </div>
            <div>
                <input name="submit" type="submit" id="submit" tabindex="3" value="Logon" />
            </div>
        % endif

    ${h.end_form()}
    <script type="text/javascript">
    $(document).ready(function(){
        $('#commentlogonform').dshints();
    });
    </script>

<div>Sign In using <a target="_parent" href="${c.google_auth_url}">Google</a></div>
</body>